import { getTableDataRequest } from '@/api/common.js'
import { reactive } from '@vue/composition-api'
export default function () {
  const tableData = reactive({
    data: [],
    total: 0
  })
  const getTableData = async (requestData) => {
    const requestParams = {
      ...requestData
    }
    // console.log(requestParams)
    const { data: res } = await getTableDataRequest(requestParams)
    console.log(res)
    tableData.data = res.data.data
    tableData.total = res.data.total ? res.data.total : 0
  }
  return {
    getTableData,
    tableData
  }
}
